package cmd

import (
	"github.com/spf13/cobra"
	"wskyygyso/api/bootstrap"
	"wskyygyso/api/pkg/crontab"
)

var CmdCron = &cobra.Command{
	Use:   "cron",
	Short: "run cron",
	Args:  cobra.NoArgs,
	Run:   runCron,
}

func runCron(cmd *cobra.Command, args []string) {
	bootstrap.SetUpCron()
	crontab.Run()
}
